import request from '@/utils/request'
import { FORM } from "@/config/baseUrl.js"

// 创建表单实例
export function createFormInst(data) {
  return request({
    url: `${FORM}/inst/formInst/createFormInst`,
    method: 'post',
    data
  })
}

// 查询表单实例
export function getFormData(params) {
  return request({
    url: `${FORM}/inst/formInst/getFormData`,
    method: 'post',
    params
  })
}

// 填写表单实例
export function inputFormData(data) {
  return request({
    url: `${FORM}/inst/formInst/inputFormData`,
    method: 'post',
    data
  })
}

// 查询表单字段定义
export function getFormField(params) {
  return request({
    url: `${FORM}/define/formDef/detail`,
    method: 'post',
    params
  })
}

// 查询表单实例列表
export function getFormList(data) {
  return request({
    url: `${FORM}/inst/formInst/list`,
    method: 'post',
    data
  })
}